#!/bin/bash

mvn clean package -Dmaven.test.skip=true -pl feign-consumer -am

if [ $? -eq 0 ]; then
    echo "====== feign-consumer maven build SUCCESS ======"
else
    echo "!!!!!! feign-consumer maven build FAIL !!!!!!"
    exit 1
fi

rm consumer_docker/feign-consumer.tar.gz

tar -zcvf feign-consumer.tar.gz feign-consumer/target/feign-consumer-0.0.1-SNAPSHOT.jar consumer_docker/start.sh

mv feign-consumer.tar.gz consumer_docker/
